package com.qijian.maindata.domain.query;


import com.qijian.common.utils.mybatis.WhereType;
import com.qijian.common.utils.mybatis.WhereTypeEnum;
import lombok.Data;
import java.util.Set;
import lombok.ToString;
import com.baomidou.mybatisplus.annotation.TableName;


/**
 * 安全员对象 查询条件类
 *
 * @author qijian
 * @date 2022-10-11
 */

@Data
@ToString
@TableName("qm_safety")
public class SafetyQuery {

    @WhereType(filed = "id")
    private Long id;
    @WhereType(filed = "id", type = WhereTypeEnum.IN)
    private Set<Long> ids;
    @WhereType(filed = "user_id")
    private Long userId;
    @WhereType(filed = "nick_name", type = WhereTypeEnum.LIKE)
    private String nickName;
    @WhereType(filed = "region", type = WhereTypeEnum.LIKE)
    private String region;
    @WhereType(filed = "quantity")
    private Long quantity;

    private Boolean isMajorHiddenDanger;

    @WhereType(func = "(sys_dept.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set({1}, ancestors) ) or sys_dept.dept_id = {1})")
    private Long deptId;

}
